package com.java.manage.controller;

import com.java.common.model.Result;
import com.java.manage.model.SupplyType;
import com.java.manage.service.SupplyTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 供应商分类管理
 */
@RestController
@RequestMapping("/supplyType")
public class SupplyTypeController {

    @Autowired
    private SupplyTypeService supplyTypeService;

    @PostMapping("/list")
    public Result list(@RequestBody SupplyType supplyType) {
        return supplyTypeService.list(supplyType);
    }

    @PostMapping("/listSupply")
    public Result listSupply() {
        return supplyTypeService.listSupply();
    }

    @PostMapping("/save")
    public Result save(@RequestBody SupplyType supplyType) {
        return supplyTypeService.save(supplyType);
    }

    @PostMapping("/modify")
    public Result modify(@RequestBody SupplyType supplyType) {
        return supplyTypeService.modify(supplyType);
    }

    @GetMapping("/remove")
    public Result remove(int[] ids) {
        return supplyTypeService.remove(ids);
    }
}
